package Chap4;

public class PC {

	private CPU cpu;
	private HardDisk HD;
	
	public PC()
	{
		
	}
	
	public PC(CPU cpu, HardDisk hD) {
		this.cpu = cpu;
		HD = hD;
	}
	public CPU getCpu() {
		return cpu;
	}
	public void setCpu(CPU cpu) {
		this.cpu = cpu;
	}
	public HardDisk getHD() {
		return HD;
	}
	public void setHD(HardDisk hD) {
		HD = hD;
	}
	
	public void show()
	{
		System.out.println("CPU speed:"+getCpu().getSpeed());
		System.out.println("HardDisk amount:"+getHD().getAmount());
	}
}
